import request from '@/utils/request'

// 查询农产品种类列表
export function listSpecies(query) {
  return request({
    url: '/species/species/list',
    method: 'get',
    params: query
  })
}

// 查询农产品种类详细
export function getSpecies(id) {
  return request({
    url: '/species/species/' + id,
    method: 'get'
  })
}
//查找所有品种
export function getAllSpecies() {
  return request({
    url: '/species/species/getAllSpecies',
    method: 'get'
  })
}

// 新增农产品种类
export function addSpecies(data) {
  return request({
    url: '/species/species',
    method: 'post',
    data: data
  })
}

// 修改农产品种类
export function updateSpecies(data) {
  return request({
    url: '/species/species',
    method: 'put',
    data: data
  })
}

// 删除农产品种类
export function delSpecies(id) {
  return request({
    url: '/species/species/' + id,
    method: 'delete'
  })
}
